/**
 * ReportGear(2011)
 */
package com.reportgear.report.view.grid;

import javax.swing.JComponent;
import javax.swing.UIManager;

import com.reportgear.report.model.ReportModel;
import com.reportgear.report.view.JWorksheet;

/**
 * 构成JWorkSheet组件基类
 * 
 * @version 1.0 2011-3-14
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since Report 1.0
 */
public class BaseGridComponent extends JComponent {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 4277154332011023713L;
	/**
	 * 报表模型
	 */
	protected ReportModel reportModel;
	/**
	 * 对应工作表
	 */
	protected JWorksheet worksheet;

	/**
	 * 构造器
	 * 
	 * @param worksheet
	 *            工作簿
	 */
	public BaseGridComponent(JWorksheet worksheet) {
		this.worksheet = worksheet;
		this.reportModel = this.worksheet.getReportModel();
		
		this.setBackground(UIManager.getColor("panel.background"));
	}
}